﻿if(obj!=null)
{
    obj.className = 'topsub topmenu_white_text';
	//obj.className = 'unseltop topmenu_black_text';
}
var obj = null;
var gIndex =null;
function UpdateChat()
{
    if(obj==null)
    {
        obj = document.getElementById("$selWhoChatMe$");
    }
    gIndex = obj.selectedIndex;
    var whoChatMe = obj.value;

    obj.disabled = true;
    var whoChatMeRequest = CreateHTTPRequest();
    var url = "/my/UpdateChat.aspx?whoChatMe="+whoChatMe;
    whoChatMeRequest.onreadystatechange =function(){WhoChatMeCallBack(whoChatMeRequest);};
    whoChatMeRequest.open("GET",url,true)
    whoChatMeRequest.send(null);
}

function WhoChatMeCallBack(whoChatMeRequest)
{
    if(whoChatMeRequest.readyState==4)
    {
        if(whoChatMeRequest.status==200)
        {
            if(whoChatMeRequest.responseText=="0") obj.selectedIndex = gIndex;
        }
        obj.disabled = false;
        whoChatMeRequest = null;
    }
}
function CreateHTTPRequest()
{
    var xmlhttp;
    try
    {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e)
    {
        try
        {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {
            xmlhttp = false;
        }
    }
    if (!xmlhttp && typeof XMLHttpRequest!='undefined')
    {
        try
        {
            xmlhttp = new XMLHttpRequest();
        }
        catch (e)
        {
            xmlhttp=false;
        }
    }
    if (!xmlhttp && window.createRequest)
    {
        try
        {
            xmlhttp = window.createRequest();
        }
        catch (e)
        {
            xmlhttp=false;
        }
    }
    return xmlhttp;
}
function NotAffirm()
{
    alert("你没验证过邮件请你先验证才能完成该功能");return;
}